package com.zhoug.common3.utils;

import android.content.Context;
import android.content.res.TypedArray;

/**
 * @Author: zhoug
 * @Date: 2024-07-18
 * @Description:
 */
public class AttributesHelper {

    public TypedArray getStyle(Context context, TypedArray typedArray, int index, int[] attrs) {
        int resourceId = typedArray.getResourceId(index, 0);
        if (resourceId != 0) {
            return context.getTheme().obtainStyledAttributes(resourceId, attrs);
        }
        return null;
    }

}
